package com.eqdd.yiqidian.bean;

import com.eqdd.yiqidian.utils.GreenDaoUtil;

/**
 * Created by lvzhihao on 17-4-7.
 */
public class EnterBean {
    int icon;
    String content;
    String right;
    boolean isEnter = true;
    boolean isTop = false;
    boolean isBottom = false;
    boolean isUnderLine = true;
    boolean isSwitch = false;
    boolean isIcon = false;
    int num = 0;
    int code = 0;
    int[] codes;


    public String getRight() {
        return right;
    }

    public EnterBean setRight(String right) {
        this.right = right;
        return this;
    }

    public EnterBean(String content, int... codes) {
        this.content = content;
        this.codes = codes;
        for (int code : codes) {
            this.num += GreenDaoUtil.getNum(code);
        }
    }

    public int[] getCodes() {
        return codes;
    }

    public EnterBean setCodes(int[] codes) {
        this.codes = codes;
        for (int code : codes) {
            this.num += GreenDaoUtil.getNum(code);
        }
        return this;
    }

    public int getCode() {
        return code;
    }

    public EnterBean setCode(int code) {
        this.code = code;
        this.num = GreenDaoUtil.getNum(code);
        return this;
    }

    public boolean isIcon() {
        return isIcon;
    }

    public EnterBean setIcon(boolean icon) {
        isIcon = icon;
        return this;

    }

    public boolean isSwitch() {
        return isSwitch;
    }

    public EnterBean setSwitch(boolean aSwitch) {
        isSwitch = aSwitch;
        return this;

    }

    public boolean isUnderLine() {
        return isUnderLine;
    }

    public EnterBean setUnderLine(boolean underLine) {
        isUnderLine = underLine;
        return this;

    }

    public EnterBean(String content) {
        this.content = content;
    }

    public EnterBean() {
        this.icon = 0;
        this.content = "";
        this.isEnter = false;
        this.isTop = false;
        this.isBottom = false;
        this.isUnderLine = true;
        this.isSwitch = false;
        this.isIcon = true;
    }

    public int getNum() {
        return num;
    }

    public EnterBean setNum(int num) {
        this.num = num;
        return this;
    }

    public int getIcon() {
        return icon;
    }

    public EnterBean setIcon(int icon) {
        this.icon = icon;
        return this;

    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isEnter() {
        return isEnter;
    }

    public EnterBean setEnter(boolean enter) {
        isEnter = enter;
        return this;

    }

    public boolean isTop() {
        return isTop;
    }

    public EnterBean setTop(boolean top) {
        isTop = top;
        return this;

    }

    public boolean isBottom() {
        return isBottom;
    }

    public EnterBean setBottom(boolean bottom) {
        isBottom = bottom;
        return this;

    }
}
